package com.elinkway.infinitemovies.listener;

import com.handmark.pulltorefresh.library.PullToRefreshBase;
import com.handmark.pulltorefresh.library.PullToRefreshBase.OnRefreshListener;

public abstract class MyOnRefreshListner implements OnRefreshListener {

	@Override
	public void onRefresh(PullToRefreshBase refreshView) {
		// addMoreData();
		if (refreshView.isHeadShowed()) {
			onRefreshData();
		} else if (refreshView.isFooterShowed()) {
			onLoadMoreData();
		}
	}

	protected abstract void onLoadMoreData();

	protected abstract void onRefreshData();

}
